import adminModol from '../../modol/admin/admin'


class adminController{

	constructor(){}

	async saveAdmin(req, res, next){
         const adminTest = {
         	user_name: req.query.name,
	         password: req.query.password
         }
         try{
         	await adminModol.create(adminTest);
         	console.log('获取管理员信息成功');
   			res.send({
   				status: 1,
   				type: 'SUCCESS',
   				message: '数据存入成功'
   			})
         }catch(err){
         	console.log('获取管理员信息失败');
			res.send({
				status: 0,
				type: 'FAILER',
				message: '数据存入失败'
			})
         }
         
	}
}

export default new adminController()